<template>
	<div class="deletebox" @contextmenu.prevent.stop="globalClickRight($event)" @click="glabalClickEvent">
		<rightMenuComponent :currentItemObj="currentActionInfo.currentItemInfo" :menuPosX="menuPosX" class="rightMenuid"
			:menuPosY="menuPosY" :itemMenuShow="itemMenuShow" :isMoreSelect="isMoreSelect"
			:globalRightMenuShow="globalRightMenuShow" :menuList="menuList" componentsFrom="del" @selectAll="selectAll"
			@deleteSeleted="deleteSeleted" @reductionAllFile="reductionAllFile" @deleteItem="deleteItem"
			@refurbish="refurbish" @cancleSelect="cancleSelect" @reductionFile="reductionFile">
		</rightMenuComponent>
		<!-- 头部 -->
		<div class="del_top"
			:style="{ paddingLeft: OfficeGlobal.delsharelimargin + 20 + 'px', paddingRight: OfficeGlobal.delsharelimargin + 20 + 'px' }">
			<slot name="TopLeftslot">
				<div class="del_topleft">
					<button class="empty" @click="clearRecycle" v-if="props.home == 'del'">
						<i class="appIcon-iconfont appIcon-qingkong"></i>
						<span class="emptytitle">清空</span>
					</button>
				</div>
			</slot>
			<div class="del_topcenter"></div>
			<div class="del_topright">
				<!-- 搜索 -->

				<div class="sousuoxin" v-if="dataTotal !== 0">
					<input autocomplete='off' id="sousuoinp" class="shareTopinp" :class="sousuo ? 'inpxin' : ''"
						v-model="searchValue" placeholder="搜索项目名称" />
					<div class="searchclass" @click="sousuoFn" :style="{
						background: sousuo ? OfficeGlobal.delshareTopshousuo ? OfficeGlobal.delshareTopshousuo : '#686CE8' : '',
						fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize + 'px' : '18px',
						borderRadius: sousuo ? '0 21px 21px 21px' : ''
					}">
						<i class="appIcon-iconfont appIcon-sousuo-xin"
							:style="{ fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize + 'px' : '18px', color: sousuo ? '#ffffff' : '', }"></i>
					</div>
				</div>
				<!-- <div class="sousuoxin">
					<input autocomplete='off' id="sousuoinp" class="shareTopinp" :class="sousuo ? 'inpxin' : ''"
						v-model="searchValue" placeholder="搜索项目名称" />
					<div class="searchclass" @click="sousuoFn" :style="{
						background: sousuo ? props.delshareTopshousuo ? props.delshareTopshousuo : '#686CE8' : '',
						color: sousuo ? '#ffffff' : '',
						borderRadius: sousuo ? '0 21px 21px 21px' : ''
					}">
						<i class="appIcon-iconfont appIcon-sousuo"
							:style="{ fontSize: props.delshareTopiconsize ? props.delshareTopiconsize + 'px' : '18px' }"></i>
					</div>
				</div> -->
				<!-- 列表切换 -->
				<div class="list_chart" @click="changetype(2)"
					v-if="type == 1 && OfficeGlobal.dellistswitch && dataTotal !== 0" :style="{
						color: OfficeGlobal.delshareTopiconcolor ? OfficeGlobal.delshareTopiconcolor : '#000',
						fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize : '16px'
					}">
					<i class="appIcon-iconfont appIcon-liebiao title"></i>
				</div>
				<div class="list_chart" @click="changetype(1)"
					v-if="type == 2 && OfficeGlobal.dellistswitch && dataTotal !== 0" :style="{
						color: OfficeGlobal.delshareTopiconcolor ? OfficeGlobal.delshareTopiconcolor : '#000',
						fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize : '16px'
					}">
					<i class="appIcon-iconfont appIcon-kapianmoshi title"></i>
				</div>
				<!-- 排序 -->
				<div class="list_chart" v-if="dataTotal !== 0">
					<i v-if="officeSortRule == 1 && officeSortType == 2"
						class="appIcon-iconfont appIcon-chuangjianshijiandaoxu title" :style="{
							fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize : '16px'
						}"></i>
					<i v-if="officeSortRule == 1 && officeSortType == 1"
						class="appIcon-iconfont appIcon-chuangjianshijianzhengxu title" :style="{
							fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize : '16px'
						}"></i>
					<i v-if="officeSortRule == 4 && officeSortType == 2"
						class="appIcon-iconfont appIcon-biaotimingchengdaoxu title" :style="{
							fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize : '16px'
						}"></i>
					<i v-if="officeSortRule == 4 && officeSortType == 1"
						class="appIcon-iconfont appIcon-biaotimingchengzhengxu title" :style="{
							fontSize: OfficeGlobal.delshareTopiconsize ? OfficeGlobal.delshareTopiconsize : '16px'
						}"></i>
					<div class="toolpaixu">
						<ul class="toolpaixuul">
							<li class="toolpaixuli"
								:style="{ color: item.index === officeSortRule ? '#4355DC' : '#fff' }"
								v-for="(item, index) in paixulistData" :key="index" @click.stop="paixuFn(item)">
								<dd>
									{{ item.item }}
								</dd>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<!-- 图表--删除 -->
		<div class="del_chartlist" v-if="type == 1 && dataTotal !== 0">
			<ul>
				<!-- 	`animate__animated animate__fadeInUp animate__delay-0${index % 5}s`, -->
				<li v-for="(item, index) in dataList" :key="index" :class="[
					currentMultipleList.map(val => { return val.officeId }).includes(item.officeId) ? 'multiple_select' : ''
				]" :style="{
					margin: OfficeGlobal.delsharelimargin ? OfficeGlobal.delsharelimargin + 'px' : '20px', width: imgwidth + 'px'
				}" @contextmenu.prevent.stop="itemClickRight($event, item)" @click.stop="cardItemCilck(item)">
					<div class="box conentbox" :style="`height:${height}px`">
						<img @error="imgLoadError($event, item)"
							v-lazy="item.officeThumbnailContent == null ? '' : item.officeThumbnailContent" />
					</div>
					<dl class="name_inp" :style="{ justifyContent: OfficeGlobal.deltitlejustifyContent }">
						<p>{{ item.officeTitle }}</p>
					</dl>
				</li>
			</ul>
		</div>
		<div class="no_data_wrap" v-if="dataTotal == 0">
			<p>回收站暂无数据</p>
		</div>
		<!-- 列表模式 -->
		<div class="del_listlist" v-if="type == 2 && dataTotal !== 0">
			<ul>
				<li v-for="(item, index) in dataList" :key="index"
					@contextmenu.prevent.stop="itemClickRight($event, item)" @click.stop="cardItemCilck(item)">
					<div class="left">
						<img v-lazy="item.officeThumbnailContent == null ? '' : item.officeThumbnailContent" alt="">
						<dl class="list_name_inp">

							<span class="inp_span"
								:style="{ fontSize: OfficeGlobal.delsharetitlefontsize, color: OfficeGlobal.delsharetitlecolor }">{{
								item.officeTitle
								}}</span>
						</dl>
					</div>
					<div class="center"></div>
					<div class="right"></div>
				</li>
			</ul>
		</div>
		<DelVue :delshow="delshow" @shanchu="shanchuFn" :deltexttitle="warringText"></DelVue>
	</div>
</template>
<script lang="ts" setup>
import rightMenuComponent from '../OfficeRightMenu/rightMenu.vue'
import DelVue from '../OfficeShare/Del.vue';
import OfficeGlobal from '@/utils/officeglobal'
import defaultImg from "@/assets/images/card_default.png"
import { reactive, watch, onMounted, ref, nextTick, defineEmits, defineProps } from "vue"
import {
	getRecycleList,
	deleteRecycleList,
	reductionFilePost
} from "@/api/recycle";
const props = defineProps([
	"officeFileType",  	//类型：1：文件夹；2：文件；3：标签
	"home",
])
const emits = defineEmits([])

const dataList = ref() // 数据列表
const dataListcopy = ref() // 数据列表
const officeFileType = ref(2) // 文件类型 1:文件夹 2:文件 3：标签
const sousuo = ref<boolean>(false) // 是否显示搜索框
const searchValue = ref('') // 搜索框内容
const imgwidth = ref(100) // 默认高度
const liheight = ref(100) // 默认高度
let height = ref(250) // 默认高度
const type = ref(1) // 判断列表展示模式 1 图标模式 2 列表模式
const npmeInp = ref<any>(null) // 判断是否点击重命名
const itemTitle = ref<any>('') // 标题名字暂存 标题为空时显示原名称
const morevisible = ref<boolean>(false) // 点击按钮后关闭弹出层
const delshow = ref(false) // 控制删除组件弹出框
const qingkong = ref(false) // 判断是否为清空状态
const officeSortRule = ref(1) // 排序规则
const officeSortType = ref(2) // 排序类型
// const delone = ref() // 删除一个的id
const warringText = ref('')
const paixulistData = [
	{ item: '删除时间', index: 1 },
	{ item: "名称排序", index: 4 },] // 排序列表
// 右键菜单属性
const menuPosX: any = ref(0)             //右键菜单水平位置
const menuPosY: any = ref(0)              //右键菜单垂直位置
const globalRightMenuShow = ref(false)  // 全局的右键菜单显示
const itemMenuShow = ref(false)          // 列表或者卡片的右键菜单显示
const isMoreSelect = ref(false)      //当前是否有多选 全选操作
const ctrlDown = ref(false)        //ctrl或command 是否被按下
const membersShow = ref(false)    //显示分享人员滑块儿
const fareurl = ref('') // 链接地址

const dataTotal = ref(1)
const currentActionInfo = reactive({
	currentItemInfo: {},
})
const currentMultipleList = reactive([])
onMounted(async () => {
	await getDataList()
	// 监听键盘事件
	document.addEventListener('keydown', (event) => {
		let e = event || window.event || arguments.callee.caller.arguments[0];
		// 按下ctrl或command
		if (e && e.keyCode == 17 || e.keyCode == 91) {
			ctrlDown.value = true
		}
	})
	// 监听松开键盘事件
	document.addEventListener('keyup', (event) => {
		let e = event || window.event || arguments.callee.caller.arguments[0];
		// ctrl或command 松开
		if (e && e.keyCode == 17 || e.keyCode == 91) { // enter 键
			ctrlDown.value = false
		}
	});
})
// 计算图高度
const getBoxHeight = () => {
	if (type.value = 1) {
		const div: any = document.querySelector('.del_chartlist>ul')
		const widthlist = div.clientWidth || div.offsetWidth || div.scrollWidth
		imgwidth.value = (widthlist / OfficeGlobal.delsharelinumber) - OfficeGlobal.delsharelimargin - OfficeGlobal.delsharelimargin
		height.value = (imgwidth.value * OfficeGlobal.delshareproportion)
	}
}
// 获取列表
const getDataList = () => {
	const params = {
		form: {
			"officeFileType": 2, //文件类型：1：文件夹；2：文件；3：标签
			"officeSortRule": officeSortRule.value, //排序规则：
			"officeSortType": officeSortType.value, //（删除时间）排序类型：1 正序；2 倒叙；
			"officeTitle": searchValue.value,  // 标题
			"officeParentId": -1, // 父级ID；'-1'查询所有，'0'查询根目录；
			"officeType": OfficeGlobal.officeType, //应用类型：1：笔记；2：思维导图；3：流程图；4：PPT；5：技能树；6：自由编辑器
		},
		size: 10000
	}
	getRecycleList(params).then((res: any) => {
		dataList.value = res.data.data.records
		dataListcopy.value = res.data.data.records
		dataTotal.value = res.data.data.total
		if (dataTotal.value == 0) {
			dataTotal.value = 0
		} else {
			if (type.value = 1) {
				getBoxHeight()
				window.addEventListener('resize', () => {
					type.value === 1 ? getBoxHeight() : ''
				})
			}
		}
	})
}
// 排序点击事件
const paixuFn = (item: any) => {
	officeSortRule.value = item.index
	if (officeSortType.value == 1) {
		officeSortType.value = 2
	} else {
		officeSortType.value = 1
	}
	getDataList()
}

// 点击搜索事件
const sousuoFn = (event: any) => {
	sousuo.value = !sousuo.value
	if (sousuo.value) {
		document.getElementById('sousuoinp')?.focus()
	} else {
		searchValue.value = ''
	}
}
// 列表切换点击事件
const changetype = (i: any) => {
	type.value = i
}
// 监听搜索事件,进行搜索请求
watch(
	() => searchValue.value,
	(newValue, oldValue) => {
		if (newValue) {
			dataList.value = dataListcopy.value
			dataList.value = dataList.value.filter((item: any) => {
				return item.officeTitle.indexOf(newValue) != -1
			})
		} else {
			dataList.value = dataListcopy.value
		}
		// getDataList()
	})

// 聚焦事件
const focusTitle = (item: any) => {
	itemTitle.value = item.title
}
// 点击清空按钮
const clearRecycle = () => {
	if (dataList.value.length) {
		warringText.value = '确定彻底清空回收站吗？'
		delshow.value = true
		qingkong.value = true
	}
}

// 清空回收站
const doClearRecycle = () => {
	// return
	let params = {
		// "officeFileType": officeFileType.value,  //1：文件夹；2：文件；3：标签
		// "officeRecycleId": -1,  //回收站ID；为'-1'则恢复或删除全部
		"officeOperationType": 2,  //操作类型：1：全部；2：根据传输数据执行；
		"officeRecycleIdList": dataList.value.map((item: any) => { return item.officeRecycleId }), //回收站ID数组
		"officeType": OfficeGlobal.officeType    //应用类型：1：笔记；2：思维导图；3：流程图；4：PPT；5：技能树；6：自由编辑器
	}
	deleteRecycleList(params).then((res: any) => {
		itemMenuShow.value = false
		globalRightMenuShow.value = false
		delshow.value = false
		getDataList()
	})
}

const doDeleteItem = () => {
	let params = {
		"officeFileType": officeFileType.value,  //1：文件夹；2：文件；
		"officeOperationType": 2,  //操作类型：1：全部；2：根据传输数据执行；
		"officeRecycleIdList": [currentActionInfo.currentItemInfo.officeRecycleId],  //回收站ID；为'-1'则恢复或删除全部
		"officeType": OfficeGlobal.officeType,    //应用类型：1：笔记；2：思维导图；3：流程图；4：PPT；5：技能树；6：自由编辑器
	}
	deleteRecycleList(params).then((res: any) => {
		itemMenuShow.value = false
		globalRightMenuShow.value = false
		delshow.value = false
		getDataList()
	})
}

// 删除所选 多选删除
const doDeleteSelect = () => {
	let params = {
		"officeFileType": officeFileType.value,  //1：文件夹；2：文件；
		// "officeRecycleId": -1,  //回收站ID；为'-1'则恢复或删除全部
		"officeOperationType": 2,  //操作类型：1：全部；2：根据传输数据执行；
		"officeRecycleIdList": currentMultipleList.map((item: any) => { return item.officeRecycleId }), //回收站ID数组
		"officeType": OfficeGlobal.officeType    //应用类型：1：笔记；2：思维导图；3：流程图；4：PPT；5：技能树；6：自由编辑器
	}
	deleteRecycleList(params).then((res: any) => {
		itemMenuShow.value = false
		globalRightMenuShow.value = false
		currentMultipleList.length = 0
		isMoreSelect.value = false
		delshow.value = false
		getDataList()
	})
}

const hideRightMenu = () => {
	itemMenuShow.value = false
	globalRightMenuShow.value = false
}
defineExpose({ hideRightMenu })
// 全部、批量删除所选
const deleteSeleted = () => {
	itemMenuShow.value = false
	warringText.value = '确定彻底删除当前所选内容吗？'
	delshow.value = true
}
// 删除弹框回调函数
const shanchuFn = (flag: boolean) => {
	itemMenuShow.value = false
	// return
	if (flag) {
		if (qingkong.value) {
			doClearRecycle()
		} else {
			// 是否多选操作
			if (isMoreSelect.value) {
				doDeleteSelect()
			} else {
				doDeleteItem()
			}
		}
	} else {
		delshow.value = false
	}
}

const xiazaipptx = () => {
}
const xiazaipdf = () => {
}
const xiazaijpg = () => {
}

// 右键菜单列表
const menuList = reactive({
	globalMenu: [
		{
			title: '刷新',
			eventName: 'refurbish',
			eventEmitParent: true,
			id: 1
		},
	],
	listItemMenu: [
		{
			title: '还原',
			eventName: 'reductionFile',
			subMenuType: '',
			eventEmitParent: true,
			isShow: true,
			id: 5
		},
		{
			title: '彻底删除',
			eventName: 'deleteItem',
			subMenuType: '',
			eventEmitParent: true,
			isShow: true,
			id: 7
		},
	],
})

// 最外层右键事件
const globalClickRight = (e: any) => {
	if (dataList.value.length) {
		let menuNum = document.querySelectorAll('.rightMenuid>.global_menu>ul>li').length
		let menuHeight = menuNum * 40 + 30
		let windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
		menuPosX.value = e.pageX;
		menuPosY.value = windowHeight - e.pageY < menuHeight ? windowHeight - menuHeight : e.pageY;
		itemMenuShow.value = false
		globalRightMenuShow.value = true
	}
}
// 全局单击事件
const glabalClickEvent = () => {
	isMoreSelect.value = false
	itemMenuShow.value = false
	globalRightMenuShow.value = false
	currentMultipleList.length = 0
}
// 卡片单击事件
const cardItemCilck = (item: any) => {
	if (ctrlDown.value) {
		if (currentMultipleList.findIndex(citem => citem.officeId == item.officeId) == -1) {
			currentMultipleList.push(...[item])
		} else {
			currentMultipleList.splice(currentMultipleList.findIndex(citem => citem.officeId == item.officeId), 1)
		}
		if (currentMultipleList.length > 1) {
			isMoreSelect.value = true
		} else {
			isMoreSelect.value = false
		}
	}

}
// 列表卡片右键事件
const itemClickRight = (e: any, item: any) => {
	let menuNum = document.querySelectorAll('.rightMenuid>.item_menu>ul>li').length
	let menuHeight = menuNum * 40 + 30
	let windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
	currentActionInfo.currentItemInfo = item
	menuPosX.value = e.pageX;
	menuPosY.value = windowHeight - e.pageY < menuHeight ? windowHeight - menuHeight : e.pageY
	itemMenuShow.value = true
}
// 右键刷新事件
const refurbish = () => {
	itemMenuShow.value = false
	globalRightMenuShow.value = false
	currentMultipleList.length = 0
	isMoreSelect.value = false
	getDataList()
}

// 删除文件
const deleteItem = () => {
	warringText.value = '确定彻底删除当前内容吗？'
	delshow.value = true
	isMoreSelect.value = false
	// delone.value = currentActionInfo.currentItemInfo.officeRecycleId
}
// 恢复文件
const reductionFile = () => {
	let param = {
		"officeFileType": officeFileType.value,  //1：文件夹；2：文件；
		"officeOperationType": 2,  //操作类型：1：全部；2：根据传输数据执行；
		"officeRecycleIdList": [currentActionInfo.currentItemInfo.officeRecycleId],  //回收站ID；为'-1'则恢复或删除全部
		"officeType": OfficeGlobal.officeType,    //应用类型：1：笔记；2：思维导图；3：流程图；4：PPT；5：技能树；6：自由编辑器
	}

	reductionFilePost(param).then((res: any) => {
		itemMenuShow.value = false
		globalRightMenuShow.value = false
		getDataList()
	})
}
const imgLoadError = (e: any, info: any) => {
	info.officeThumbnailContent = defaultImg
}
// 全部、批量恢复文件
const reductionAllFile = () => {
	let param = {
		"officeFileType": officeFileType.value,  //1：文件夹；2：文件；
		// "officeRecycleId": -1,  //回收站ID；为'-1'则恢复或删除全部
		"officeOperationType": 2,  //操作类型：1：全部；2：根据传输数据执行；
		"officeRecycleIdList": currentMultipleList.map((item: any) => { return item.officeRecycleId }), //回收站ID数组
		"officeType": OfficeGlobal.officeType    //应用类型：1：笔记；2：思维导图；3：流程图；4：PPT；5：技能树；6：自由编辑器
	}

	reductionFilePost(param).then((res: any) => {
		itemMenuShow.value = false
		globalRightMenuShow.value = false
		currentMultipleList.length = 0
		isMoreSelect.value = false
		getDataList()
	})
}
// 取消多选  全选
const cancleSelect = () => {
	itemMenuShow.value = false
	isMoreSelect.value = false
	globalRightMenuShow.value = false
	currentMultipleList.length = 0
}

// 全选事件
const selectAll = () => {
	isMoreSelect.value = true
	globalRightMenuShow.value = false
	itemMenuShow.value = false
	currentMultipleList.push(...dataList.value)
}
</script>
<style lang="scss" scoped>
.no_data_wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: PingFangSC-Regular;
	font-size: 18px;
	color: #7A8BBF;
	letter-spacing: 0;
}

.multiple_select {
	border: 1px solid #7A84FF !important;
	// box-sizing: border-box;
}

.deletebox {
	width: 100%;
	height: 100%;

	.del_top {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 30px;
	}

	.del_topleft,
	.del_topcenter,
	.del_topright {
		width: auto;
	}
}

.del_topleft {

	.empty {
		width: 88px;
		height: 42px;
		background: #1b1e23;
		// border: 1px solid rgba(230, 229, 255, 1);
		box-shadow: 0 0 20px 0 rgb(104 108 232 / 15%);
		border-radius: 10px;
		color: #cfd0d9;
		font-size: 18px;
		transition: all 0.3s;
		border: none;

		span {
			margin: 0 0 0 6px;
		}

		&:hover {
			cursor: pointer;
			color: #fff;
			background-color: #4355dc;
		}
	}
}

.del_topright {
	display: flex;
	// padding-right: 40px;
	justify-content: flex-end;

	.sousuoxin {
		display: flex;
		margin-right: 10px;
		align-items: center;
		position: relative;

		#sousuoinp {
			// color: rgba(158, 171, 231, 1);

			&::-webkit-input-placeholder {
				/* WebKit browsers */
				// color: rgba(158, 171, 231, 1);
				// background-color: #f9f7f7;
				font-size: 16px;
				padding-left: 10px;
			}
		}

		i {
			color: #cfd0d9;
		}

		.shareTopinp {
			width: 0;
			height: 42px;
			border: none;
			outline: none;
			margin-right: -42px;
			z-index: 3;
			border-radius: 21px;
			transition: all 0.5s ease-in-out;
			// display: none;
			background: transparent;
			color: #fff;
		}

		.searchclass {
			width: 42px;
			height: 42px;
			// background: rgb(170, 81, 81);
			border-radius: 21px;
			display: flex;
			justify-content: center;
			align-items: center;
			z-index: 5;
			transition: all 0.5s;
			box-shadow: 0 0 20px 0 rgba(104, 108, 232, 0.15);

			&:hover {
				// border: 1px solid rgba(243, 243, 255, 1);

				background-color: #4355dc;
				cursor: pointer;

				i {
					color: #fff;
				}
			}
		}

		.inpxin {
			width: 200px;
			height: 42px;
			padding: 0 42px 0 10px;
			box-shadow: 0 0 30px 0 rgba(104, 108, 232, 0.1);
		}
	}

	.list_chart {
		width: 42px;
		height: 42px;
		margin: 0 10px;
		// background: rgb(180, 95, 95);
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		position: relative;
		transition: all 0.3s;
		box-shadow: 0 0 20px 0 rgba(104, 108, 232, 0.15);

		i {
			color: #cfd0d9;
		}

		&:hover {
			background: #4355dc;
			cursor: pointer;

			i {
				color: #fff;
			}

			.toolpaixu {
				display: block;
			}
		}

		.toolpaixu {
			display: none;
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			top: 20px;
			transition: all 0.8s ease-in-out;
			padding-top: 30px;
			width: 250%;
			z-index: 10;

			ul {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				box-shadow: 0px 4px 20px 0px rgba(87, 98, 253, 0.1);
				padding: 10px;
				border-radius: 10px;
				background-color: #1b1e23;

				li {
					width: 100%;
					display: flex;
					align-items: center;
					justify-content: center;
					margin: 5px 0;

					dd {
						height: 34px;
						display: flex;
						align-items: center;
						justify-content: center;
						transition: all 0.2s;
					}

					&:hover {
						// color: #686CE8;
						cursor: pointer;
						background: #242B3E;
						border-radius: 8px;
					}
				}
			}
		}
	}
}

// 图表
.del_chartlist {
	overflow: hidden;
	padding: 0 20px;
	height: calc(100% - 50px);

	ul {
		height: 100%;
		overflow-y: scroll;
		margin: 10px 0;
	}

	li {
		float: left;
		margin: 20px;
		box-sizing: border-box;
		// width: calc(20% - 40px);
		box-shadow: 0 0 30px 0 rgba(47, 50, 134, 0.1);
		border-radius: 16px;
		background: #181a1e;
		transition: 0.3s all ease;
		overflow: hidden;
		text-align: center;
		border: 1px solid #070809;

		&:hover {
			transform: scale(1.05);
		}

		.box {
			background-size: cover;
			width: 100%;
			border-radius: 16px;
			position: relative;
			overflow: hidden;
			background-color: #fff;

			&:hover {

				.view,
				.edit {
					opacity: 1;
				}

				.bianji {
					transform: translate(0, 0);
				}
			}

			.bianji {
				position: absolute;
				top: 0;
				right: 0;
				width: 46px;
				height: 40px;
				background: rgba(255, 255, 255, 0.8);
				box-shadow: 0px 10px 40px 0px rgba(153, 148, 178, 0.15);
				border-radius: 0px 14px 0px 14px;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #4355dc;
				font-size: 20px;
				transform: translate(46px, -40px);
				transition: all 0.3s;
			}

			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}

			.mask {
				position: absolute;
				width: 100%;
				height: 100%;
				background: rgba(0, 0, 0, 0.3);
				left: 0;
				top: 0;
				border-radius: 16px;
				z-index: 8;
				opacity: 0;
			}

			.view {
				position: absolute;
				right: 65px;
				bottom: 10px;
				display: flex;
				z-index: 9;
				opacity: 0;

				dd {
					width: 30px;
					height: 30px;
					background: #fff;
					border-radius: 8px;
					color: #afacc7;
					display: flex;
					align-items: center;
					justify-content: center;
					margin-left: 10px;
					cursor: pointer;
				}
			}

			.edit {
				position: absolute;
				right: 20px;
				bottom: 10px;
				display: flex;
				z-index: 9;
				opacity: 0;

				dd {
					width: 30px;
					height: 30px;
					background: #fff;
					border-radius: 8px;
					color: #afacc7;
					text-align: center;
					line-height: 30px;
					margin-left: 10px;
					cursor: pointer;
				}

				.listRestore:hover {
					color: #7a84ff;
				}
			}
		}

		.name_inp {
			text-align: initial;
			height: 44px;
			font-size: 17px;
			line-height: 44px;
			padding: 0 15px;
			display: flex;
			align-items: center;
			justify-content: normal;
			color: #fff;

			&:hover .icon-bianji {
				display: block;
			}

			.name_inp_inp {
				background-color: transparent;
				border: none;
				outline: none;
				text-align: center;
				width: 100%;
				height: 35px;
				font-size: 18px;

				&:hover {
					cursor: default;
				}

				&:focus {
					background-color: #fff;
					color: #000;
					border-radius: 15px;
					border: none;
					outline: none;
					box-shadow: 0 8px 20px 0 rgb(47 50 134 / 10%);
				}
			}

			.inp_span {
				font-size: 18px;
				margin-left: 10px;
				color: #413a50;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}

			.icon-bianji {
				display: none;
			}

			p {
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}

		}
	}

	.homenew {
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;

		span {
			width: 46px;
			height: 46px;
			transform: rotate(45deg);
			background: #7A84FF;
			// box-shadow: 2px 0px 4px 0px rgba(255, 255, 255, 0.5);
			// box-shadow: 0px 4px 5px 0px rgba(122, 132, 255, 0.3);
			box-shadow: 0 8px 20px 0 rgba(122, 132, 255, 0.3);
			display: flex;
			justify-content: center;
			align-items: center;
			border-radius: 10px;
			color: #fff;

			i {
				transform: rotate(45deg);
			}
		}
	}
}

// 列表部分
.del_listlist {
	overflow: hidden;
	padding: 0 20px;
	height: calc(100% - 50px);

	ul {
		height: 100%;
		overflow-y: auto;
		padding: 10px 20px 5px;

		li {
			width: 100%;
			height: 81px;
			border-radius: 15px;
			padding: 14px 10px;
			transition: all 0.3s;

			img {
				width: 63px;
				height: 53px;
				object-fit: cover;
				border-radius: 15px;
				margin-right: 10px;
			}

			.left {
				width: 33.33%;
				display: flex;
				align-items: center;
			}

			.center {
				width: 33.33%;
			}

			.right {
				width: 33.33%;
			}

			&:hover {
				background: #181a1e;
				box-shadow: 0px 2px 10px 0px rgba(3, 7, 21, 0.21);
				border-radius: 15px;
			}
		}
	}
}
</style>
<style lang="scss">
::-webkit-scrollbar {
	width: 5px;
	height: 5px;
	background-color: transparent;
}
</style>